package com.bluesky.jwf.component.list;

import java.util.List;

public class ListCollectionProvider<T> implements CollectionProvider<T> {
	private List<T> list;

	public ListCollectionProvider(List<T> list) {
		this.list = list;
	}

	@Override
	public List<T> get(int startIndex, int endIndex) {
		return list.subList(startIndex, endIndex);

	}

	@Override
	public int getCount() {

		return list.size();
	}

}
